import request from '@/utils/request'

// 获取全部信息
export function getActivityAllApi() {
    return request({
        url: '/community',
        method: 'get',
    })
}

// 获取活动列表
export function getActivityListApi(params) {
    return request({
        url: '/service/activity',
        method: 'get',
        params
    })
}

// 获取活动详情
export function getActivityInfoApi(id) {
    return request({
        url: '/service/activity/' + id,
        method: 'get',
    })
}

// 新增数据
export function addActivityApi(data) {
    return request({
        url: '/service/activity',
        method: 'post',
        data
    })
}

// 修改数据
export function editActivityApi(data) {
    return request({
        url: '/service/activity/' + data.id,
        method: 'put',
        data
    })
}

// 删除数据
export function delActivityApi(id) {
    return request({
        url: '/service/activity/' + id,
        method: 'delete',
    })
}